package com.baizhi.mapper;

import com.baizhi.dto.response.StudentDTO;
import com.baizhi.entity.Teacher;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 16357
* @description 针对表【t_teacher】的数据库操作Mapper
* @createDate 2024-08-14 09:43:07
* @Entity com.baizhi.entity.Teacher
*/
public interface TeacherMapper extends BaseMapper<Teacher> {

    /**
     * 根据学生ID和课程ID修改学生成绩
     * @param stuId 学生ID
     * @param courseId 可成ID
     * @return 成功-1 失败-0
     */
    Integer updateScoreByStuIdAndCourseId(
            @Param("stuId") Integer stuId,
            @Param("courseId") Integer courseId,
            @Param("score") Integer score);


    /**
     * 根据课程ID查询选择该门课程的学生信息
     * @param courseId 课程ID
     * @return 返回选择该门课程的学生信息列表
     */
    List<StudentDTO> queryStudentsByCourseId(Integer courseId);
}




